package ch.sfug.log.output {
	import flash.events.StatusEvent;
	import flash.net.LocalConnection;	

	/**
	 * @author marcel
	 */
	 
	public class LogAirTracer implements ILoggerOutput {

		private var outbound:LocalConnection = new LocalConnection();
		
		
		public function LogAirTracer():void 
		{
			outbound.addEventListener(StatusEvent.STATUS, onStatus);
		}
		 
		public function append(txt:String):void {
			callAirTracer("doMessage", txt);
		}

		
		public function clear():void {
			outbound.send("app#com.nemos.NemosAirTracer.A055C53F072976B18515B9921671D5BEC7FAF9DB.1:aircon", "clear");
		}

		
		/**
		 * calls the Air Tracer
		 */
		private function callAirTracer( func:String, para:String ):void {
			outbound.send("app#com.nemos.NemosAirTracer.A055C53F072976B18515B9921671D5BEC7FAF9DB.1:aircon", func, para);
		}
		
		private function onStatus(event:StatusEvent):void 
		{
            switch (event.level) {
                case "status":
                    
                    break;
                case "error":
                    
                    break;
            }
        }

	}
}
